<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<link id="themeStyles" rel="stylesheet" href="/js/dojo-release-1.3.2-src/dijit/themes/nihilo/nihilo.css">
	<style type="text/css">
		@import "/js/dojo-release-1.3.2-src/dojo/resources/dojo.css";
    @import "/js/dojo-release-1.3.2-src/dojox/grid/resources/Grid.css";
    @import "/js/dojo-release-1.3.2-src/dojox/grid/resources/tundraGrid.css";
    .dojoxGrid table { margin: 0; } html, body { width: 100%; height: 100%; margin: 0; }
    TABLE.mite {border-width: 1; border-style: solid;}
    TD.mite {border-width: 1px; padding: 0px; border-style: solid; }
    TD.meta {background-color: AliceBlue; }
  </style>
	<script type="text/javascript" src="/js/dojo-release-1.3.2-src/dojo/dojo.js" djConfig="debugAtAllCosts:true, isDebug: true, parseOnLoad: false, dojoIframeHistoryUrl:'/js/dojo-release-1.3.2-src/dojo/resources/iframe_history.html'">
	</script>
	<script type="text/javascript" src="mite.js"></script>
	<script type="text/javascript" src="ui.js"></script>
</head>
<body class="nihilo">
	<p id="loading"><b>Loading . . .</b></p>
</body>
<script type="text/javascript">
  dojo.addOnLoad( function() {
    dojo.require("mite.Data");

    var d1 = new mite.Data({id: 1});
    d1.attr("query", {mite: {game: [{meta: {qid: d1.id}}, {session_start: {qid: d1.id}}]}});
    dojo.body().appendChild(d1.domNode);

    function get_session() {return mite_get_session(d1.id);}

    var d2 = new mite.Data({id:999});
    d2.attr("query",
      [
        {mite: {game: [
          {meta: {qid: d2.id}},
          {game_start: {qid: d2.id, sid: get_session}}]}},
        {mite: {game: [
          {game_state: {qid: d2.id, sid: get_session,
            board: function() {return mite_get_cell("999.game.game_start.7", 0, 0)}}},
          {game_scope: {qid: d2.id, sid: get_session,
            board: function() {return mite_get_cell("999.game.game_start.7", 0, 0)}}}]}},
        {mite: {game: [
          {game_move: {x: 10, y: 10,
            piece: function() {return mite_get_cell("999.game.game_state.2", 0, 0)},
            scid: function() {return mite_get_cell("999.game.game_scope.2", 0, 0)}}},
          {game_move: {x: 25, y: 25,
            piece: function() {return mite_get_cell("999.game.game_state.2", 1, 0)},
            scid: function() {return mite_get_cell("999.game.game_scope.2", 0, 0)}}}]}}
      ]);
    dojo.body().appendChild(d2.domNode);
    dojo.connect(d2, "onQueryComplete", null, "ui_make_the_ui");
    d2.connect(d1, "onQueryComplete", "startup");
    d1.startup();
  }); // dojo.addOnLoad
</script>
</html>
